package 开始的剑指offer8月.面经常用算法题09开始的;
//https://xindoo.blog.csdn.net/article/details/80822175
// https://leetcode-cn.com/problems/implement-rand10-using-rand7/
//https://leetcode-cn.com/problems/implement-rand10-using-rand7/solution/tong-ge-lai-shua-ti-la-yi-ti-liang-jie-j-aqyk/
//
public class 拒绝采样470用Rand7实现Rand100905 {
    /**
     * The rand7() API is already defined in the parent class SolBase.
     * public int rand7();
     * @return a random integer in the range 1 to 7
     */

//    class Solution extends SolBase {
//        public int rand10() {
//            int x = (rand7()-1)*7 + rand7();
//            return x<=40 ? x%10 +1 : rand10();
//        }
//    }

}
